<template>
  <div class="recommendContainer">
    <!-- 轮播图 -->
    <div class="banner">
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" width="200px" height="20px">
        <van-swipe-item v-for="(item, index) in swiperPhotos" :key="item.id">
          <img :src="item.picUrl" />
        </van-swipe-item>
      </van-swipe>
    </div>
    <!-- 政策信息 -->
    <div class="policyDescList">
      <div class="policyDescItem" v-for="(policyDescItem,index) in policyDescList" :key="index">
        <img :src="policyDescItem.icon">
        <span>{{policyDescItem.desc}}</span>
      </div>
    </div>
    <!-- 导航菜单 -->
    <div class="kingKongModule">
      <div class="kingKongItem" v-for="(kingKongItem,index) in kingKongModule.kingKongList" :key="index">
        <img :src="kingKongItem.picUrl"></img>
        <span>{{kingKongItem.text}}</span>
      </div>
    </div>
    <!-- 新人专享 -->
    <!-- <div class="moduleTitle">
      <span class="txt">-新人专享礼-</span>
    </div>
    <div class="content">
      <div class="left">
        <div class="name">新人专享礼包</div>
        <img src="https://yanxuan.nosdn.127.net/static-union/1648017994dd2933.png" alt="">
      </div>
      <div class="right">
        <div class="module1">
          <div class="picWrap">
            <div>
              <img src="https://yanxuan-item.nosdn.127.net/175db1099efdb8314835ef50a894508b.png" alt="">
            </div>
            <div class="discount">
              <div class="line1">￥15.8</div>
              <div class="line2">￥19</div>
            </div>
          </div>
          <div class="cnt">
            <div class="title">福利社</div>
            <div class="title">今日特价</div>
          </div>
        </div>
        <div class="module2">
          <div class="picWrap">
            <div>
              <img src="https://yanxuan-item.nosdn.127.net/f62534d32b4bb9cc7282f782e3dbe43c.png" alt="">
            </div>
            <div class="discount">
              <div class="line1">￥108</div>
              <div class="line2">￥128</div>
            </div>
          </div>
          <div class="cnt">
            <div class="title">新人拼团</div>
            <div class="title">1元起包邮</div>
          </div>
        </div>
      </div>
    </div> -->
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  name: "Recommend",
  computed: {
    ...mapGetters(["policyDescList", "kingKongModule", "swiperPhotos"]),
  },
};
</script>

<style>
</style>
<style lang="less">
.recommendContainer {
  .banner {
     .my-swipe .van-swipe-item {
      text-align: center;
      width: 375px;
      height: 148px;
      img {
        width: 100%;
        height: 100%;
      }
    }
  }
  .policyDescList {
    display: flex;
    .policyDescItem {
      flex: 1;
      text-align: center;
      img {
        width: 16px;
        height: 16px;
        vertical-align: middle;
      }
      span {
        font-size: 14px;
        visibility: middle;
        margin-left: 4px;
      }
    }
  }
  .kingKongModule {
    height: 174.5px;
    display: flex;
    flex-wrap: wrap;
    .kingKongItem {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 20%;
      img {
        width: 55px;
        height: 55px;
      }
      span {
        font-size: 12px;
        vertical-align: middle;
        margin-top: 5px;
        width: 55px;
      }
    }
  }
  // .moduleTitle {
  //   width: 345px;
  //   height: 45px;
  //   padding: 0 15px;
  //   font-size: 16px;
  //   line-height: 45px;
  //   text-align: center;
  //   .txt {
  //     margin: auto;
  //   }
  // }
}
</style>